<template>
  <div class="select-language">
    <select class="r-language" v-model="rLanguage">
      <option v-for="(lan, k) in languages" :key="lan" :value="k">{{ lan }}</option>
    </select>

    <select class="n-language" v-model="nLanguage">
      <option v-for="(lan, k) in languages" :key="lan" :value="k">{{ lan }}</option>
    </select>
  </div>
</template>

<script>
  import { Select, Option } from 'element-ui';

  export default {
    name: 'selectLanguage',
    data() {
      return {
        languages: {
          en: 'English',
          de: 'German',
          fr: 'France',
          cn: '简体中文',
          tc: '繁体中文'
        },
        rLanguage: 'en',
        nLanguage: 'cn'
      };
    },
    components: {
      teSelect: Select,
      teOption: Option
    }
  };
</script>

<style scoped>
  .select-language {
    display: flex;
    justify-content: space-between;
  }

  select {
    border-radius: 0;
    padding: 8px;
    width: 50%;
    color: #fff;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
  }
  select:hover {
    background: #008ae6;
  }
</style>
